package com.yootk;
import java.io.*;
public class YootkDemo_OutputStream {
    public static void main(String[] args) throws Exception {
        File file = new File("H:" + File.separator + "muyan" + File.separator + "vip" + File.separator + "yootk.txt");
        if (!file.getParentFile().exists()) {
            file.getParentFile().mkdirs();
        }
        OutputStream output = new FileOutputStream(file);
        String message = "www.yootk.com";
        // OutputStream类的输出是以字节数据为主的，所以需要将字符串转为字节数据
        byte data[] = message.getBytes();
        output.write(data);
        output.close();
    }
}